﻿using System;
using System.Collections.Generic;
using Facet.Combinatorics;

class DistinctCombination
{
    static void Main()
    {
        Console.Write("Enter value for N [1..N]: ");
        int N = int.Parse(Console.ReadLine());

        Console.Write("Enter value for K [K1, K2...KN]: ");
        int K = int.Parse(Console.ReadLine());
        
        int[] inputInt = new int[N];

        for (int i = 0; i < N; i++)
        {
            inputInt[i] = i + 1;
        }

        Console.WriteLine(new string('*', 20));
        Console.WriteLine("All variations without repetition");
        Combinations<int> combinations = new Combinations<int>(inputInt, K, GenerateOption.WithoutRepetition);
        
        foreach (IList<int> items in combinations)
        {
            Console.Write("{");
            foreach (int item in items)
            {
                Console.Write(item + ", ");
            }
            Console.WriteLine("\b\b}");
        }
    }
}
